<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EQU</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body class="text">
<p class="heading">Assembler Directives - EQU<hr noshade></p>
<p></p>
<p><b>EQU</b> - links a name (label) to a value. Similar to defining a constant in C++.</p>
<p class="sourcecode">Usage:<br>
label&nbsp; EQU &nbsp;&nbsp; value</p>
<p class="sourcecode">BACK_SP&nbsp;&nbsp; EQU&nbsp;&nbsp;&nbsp; $08&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ASCII code for backspace</p>
<p>Equates BACK_SP with the hex value $08 which is the ASCII code for backspace. In programs we can now use the word BACK_SP to represent $08. This makes our program much easier to read and modify. Once an expression has been equated to a value it may in turn be used in other equate directives, example:</p>
<p class="sourcecode">Length&nbsp;EQU&nbsp;&nbsp;&nbsp; 30<br>
  Width&nbsp;&nbsp;EQU&nbsp;&nbsp;&nbsp; 25<br>
  Area&nbsp;&nbsp;&nbsp;EQU&nbsp;&nbsp;&nbsp; Length*Width</p>
</body>
</html>
